<?php

namespace Part08_FactoryMethodModel\Code3;

class SimpleFactory
{
    public static function CreateLeiFeng($type)
    {
        switch ($type) {
            case '学雷锋的大学生':
                return new Undergraduate();
            case '社区志愿者';
                return new Volunteer();
            default:
                return null;
        }
    }
}